package com.tuling.llmlangchain4j.service;


import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

/**
 * 基于内存的会话
 */
@AiService(wiringMode = EXPLICIT,
        chatModel = "qwenChatModel",
        chatMemory = "chatMemery"
)
public interface Assistant {
//    @SystemMessage("You are a polite assistant")
    String chat(String userMessage);

    @SystemMessage(fromResource = "classpath:xiaozhi-system-template.txt")
    String chat(@MemoryId String memoryId, @UserMessage String userMessage);
}
